<template>
  <!-- 执行计划页面 -->
  <div class="actionplan" style="zIndex=1000">
    <actionPlanInfo :planId="planId" :usvId="usvId" :routePath="routePath"></actionPlanInfo>
  </div>
</template>

<script>
import actionPlanInfo from '@/components/plan/ActionPlan-info';

// 事件总线
import bus from "@/components/common/bus"
export default {
  name: 'actionplan',
  components: {
    actionPlanInfo
  },
  data() {
    return {
      // 传入的id值
      planId: this.$route.query.planId,
      usvId: this.$route.query.usvId,
      routePath: this.$route.query.routePath,
      DisconnectMessage: ''
    };
  },
  computed: {},
  methods: {},
  created() { },
  mounted() {
    bus.$on("Disconnect", ({ message }) => {
      this.DisconnectMessage = message
    })
  },
  // 销毁当前实例清除掉定时器
  destroyed() {
    console.log('被销毁了');
  },

  watch: {
    DisconnectMessage() {
      if (this.DisconnectMessage) {
        this.$message.error(this.DisconnectMessage)
      }
      console.log(this.DisconnectMessage);
      this.DisconnectMessage = ''
    }
  }
};
</script>

<style lang="less" scoped>
li {
  list-style: none;
}
.actionplan {
  width: 100%;
  height: 100%;
}
</style>
